table.insert(itemActions,
	function(item, action)
		-- MAGIC rings
		-- see: dir .. "readme.txt" for information regarding these variables
		local priority = 2
		local identify = true
		local dump = true

		if not (item.quality == ItemQuality.Magic and item.baseItem.code == "rin") then
			return false
		elseif action == aPICK and (not item.flags.Identified or isGoodMagicRing(item)) then
			return priority
		elseif action == aIDENT then
			return identify
		elseif action == aSELL and item.flags.Identified and not isGoodMagicRing(item) then
			return true
		elseif action == aDUMP and item.flags.Identified and not isGoodMagicRing(item) then
			return dump
		end

		return false
	end
)

function isGoodMagicRing(item)
	-- so many good magic rings!!! >.<
	return (
		   (findStat(item, "Magic Find") > 25 or -- mf ring
           hasRes(item, 10, 4) or
           hasRes(item, 12, 3) or
           hasRes(item, 20, 2)
		   )
		   )
end
